tom-index
tom-index.Rmd
library(lmstt)Background
For this project, I decided to recreate Hans Rosling’s population and GDP graph. The graph can be found here.
Since the video did not share the dataset, I downloaded another dataset from Our World in Data.
Data Visualization
I used plotly and crosstalk to make a visualization. I think crosstalk does not go well with animation plots as the continents/countries shown are different from ones selected.
Improvement
For the improvement, I would like to make a similar graph to the Figure 13.10 from Wilke’s Fundamentals of Data Visualization.
The code was taken and modified from Wilke’s github repo.
The graph below shows how life expectancy and GDP per capita transition over time in Afghanistan. The transparency of the line represents year. In the future, I would like to incorporate the graph with crosstalk. It seems like crosstalk does not go well with geom_text_repel. I also need to figure out how to show only selected country in the graph (in the previous graphs, color = entity does it for me, but the graph below has nothing to differentiate countries if that makes sense).

Reflection
I wanted to make it as simple as possible. Without the selector for continents/countries, all dots were crammed together and it was difficult to see specific continents/countries. After implementing the selector, I think the visualization became much simpler.
For the animation visualizations, selected countries do not match with what are shown in the graph, which I want to fix in the future. For the bar graph, the adjacent countries in the list have similar color, so it is hard to distinguish.
The most frustrating part was definitely the mismatching between selected and shown.